import tkinter as tk


root = tk.Tk()
root.title("Demo")
root.geometry("800x600")
app_frame = tk.Frame(root)
app_frame.pack(fill="both", expand=True)


# 文本框
text_box = tk.Text(app_frame, height=10, width=50)
text_box.pack()

# entry
entry = tk.Entry(app_frame, width=50)
entry.pack()

# 按钮
button = tk.Button(app_frame, text="insert", command=lambda: text_box.insert(tk.END, entry.get()))
button.pack()


def insert_point():
    text_box.insert(tk.INSERT, entry.get())

# 按钮
button = tk.Button(app_frame, text="insert_point", command=insert_point)
button.pack()

# 按钮
button = tk.Button(app_frame, text="insert_current", command=lambda: text_box.insert(tk.CURRENT, entry.get()))
button.pack()

root.mainloop()